<template>
  <div class="hello">
    <h1>{{msg}}</h1>
    <h1>{{msgfromfather}}</h1>
    <p>child tells me</p>
    <button v-on:click="onClickMe"
    > click!</button>
  </div>
</template>

<script>
    export default {
      name: "component-a",
      data(){
          return{
            msg:"Hello from component a!"
          }
      },
      props:['msgfromfather'],
      methods:{
        onClickMe(){
            //console.log(this.msgfromfather)
          this.$dispatch('child-tell-me-something',this.msg);
        }
      }
    }
</script>

<style scoped>

</style>
